package com.shangjinrong.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 交易流水表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "trans_flow")
public class TransFlow {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 用户名称
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 交易单号
     */
    @TableField(value = "trans_no")
    private String transNo;

    /**
     * 交易类型（1：充值 2：提现 3：投标 4：投资回款 ...）
     */
    @TableField(value = "trans_type")
    private Byte transType;

    /**
     * 交易类型名称
     */
    @TableField(value = "trans_type_name")
    private String transTypeName;

    /**
     * 交易金额
     */
    @TableField(value = "trans_amount")
    private BigDecimal transAmount;

    /**
     * 备注
     */
    @TableField(value = "memo")
    private String memo;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除(1:已删除，0:未删除)
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private Boolean isDeleted;

    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_USER_NAME = "user_name";

    public static final String COL_TRANS_NO = "trans_no";

    public static final String COL_TRANS_TYPE = "trans_type";

    public static final String COL_TRANS_TYPE_NAME = "trans_type_name";

    public static final String COL_TRANS_AMOUNT = "trans_amount";

    public static final String COL_MEMO = "memo";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETED = "is_deleted";
}